<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>博客首页</title>
</head>
<body>
{% for article in articles %}
    <h2>
        <a href="{% url 'show_article' article_id=article.id %}" target="_blank">
            {{ article.title }}
        </a>
    </h2>
    <h5>{{ article.pub_date }}</h5>
    <div>
        {{ article.content | truncatewords:20 }}
    </div>
{% endfor %}
</body>
</html>